As known in the field of computer virtualization, virtual machine forking (referred to herein as “VM forking”) is a technology that allows a running virtual machine (VM) to be split, or “forked,” into one or more child VM instances, each inheriting the memory, virtual device, and disk state of the original (i.e., parent) VM. An implementation of this technology is disclosed in commonly assigned U.S. patent application Ser. Nos. 14/136,621, 14/136,661, 14/136,701, 14/136,741, filed Dec. 20, 2013.
In existing VM forking implementations, memory is inherited via copy-on-write techniques, virtual device state is inherited using cached checkpoints, and disk state is inherited using disk snapshots. With respect to disk state inheritance, at the time a child VM is forked from a parent VM, a snapshot is taken of the parent VM's current running point (i.e., the virtual disk that the parent VM is configured to currently write to, referred to as a “parent disk”), which results in the creation of a delta disk pointing to that parent disk. The delta disk (referred to as a “child disk”) is then provided to the child VM as the child VM's current running point, thereby allowing the child VM to access the parent VM's disk state by virtue of the relationship between the parent and child disks. This relationship can be understood as forming (or being part of) a disk hierarchy, where the parent disk corresponds to a parent node in the hierarchy and the child disk corresponds to a child node of the parent node in the hierarchy. Both the memory state and the disk state of the child VM are shared with the parent VM via copy-on-write techniques. The child VM may read the parent disk. However, any write operations will be directed to the delta disk (“the child disk”).